package com.litchi.persistence.repo;

import com.litchi.entity.Lottery;
import org.springframework.data.domain.Sort;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by huash on 2016/5/7.
 */
@Transactional(readOnly = true)
@RepositoryRestResource(collectionResourceRel = "lotteries", path = "lotteries")
@Repository
public interface LotteryRepository extends PagingAndSortingRepository<Lottery, Long> {
    List<Lottery> findFirst1ByRound(Integer round, Sort sort);

}
